package TransactionImplementation

import (
	"SPC/AbstractTransactions"
	"SPC/Model"
	"SPC/ModelImplementation"
)

type ChangeCommissionedTransaction struct {
	AbstractTransactions.ChangeClassificationTransaction
	itsSalary float64
	itsCommissionRate float64
}

func NewChangeCommissionedTransaction(empid int, salary float64, commissionRate float64) *ChangeCommissionedTransaction {
	n := &ChangeCommissionedTransaction {
		*AbstractTransactions.NewChangeClassificationTransaction(empid),
		salary,
		commissionRate,
	}
	n.ChangeClassificationTransaction.GetClassification = n.GetClassification
	n.ChangeClassificationTransaction.GetSchedule = n.GetSchedule
	return n
}


func (c * ChangeCommissionedTransaction)GetClassification()Model.PaymentClassification{
	return ModelImplementation.NewCommissionedClassification(c.itsSalary,c.itsCommissionRate)
}

func (c * ChangeCommissionedTransaction)GetSchedule()Model.PaymentSchedule{
	return &ModelImplementation.BiweeklySchedule{}
}